#include<bits/stdc++.h>
using namespace std;
inline int read()
{
	int x=0;char ch=getchar();
	while(!isdigit(ch)) ch=getchar();
	while(isdigit(ch)) x=(x<<3)+(x<<1)+(ch^48),ch=getchar();
	return x;
}
int stk[10],tp;
inline void write(int x)
{
	if(!x) return putchar('0'),void();
	tp=0;
	while(x) stk[++tp]=x%10,x/=10;
	while(tp) putchar(stk[tp--]^48);
}
const int N=1e6+10;
int n,T,fa[N],ans[N];
set<int>s1,s2;
set<int>::iterator it;
vector<int>edge[N];
void add(int x)
{
	s1.insert(x);ans[++T]=x;
	if(s1.find(fa[x])!=s1.end()) s1.erase(fa[x]);
	for(int v:edge[x])
		if(v!=fa[x]) s2.insert(v),fa[v]=x;
	s2.erase(x);
}
void solve(int x=0)
{
	add(1);
	while(T<n)
	{
		assert(!s1.empty()&&!s2.empty());
		it=s1.end();--it;
		it=s2.lower_bound(*it);
		if(it==s2.end())
		{
			if((int)s1.size()==1) puts("-1"),exit(0);
			it=s1.end();--it;
			x=*it;--it;
			int Mn=1e9;
			for(int v:edge[x])
				if(v!=fa[x]&&v>(*it)) Mn=min(Mn,v);
			if(Mn==1e9) puts("-1"),exit(0);
			assert(s2.find(Mn)!=s2.end());
			add(Mn);
		}
		else add(*it);
	}
	for(int i=1;i<=n;i++)
		write(ans[i]),putchar(i==n?'\n':' ');
}
int main()
{
	freopen("choice.in","r",stdin);
	freopen("choice.out","w",stdout);
	n=read();
	for(int i=1,u,v;i<n;i++)
	{
		u=read(),v=read();
		edge[u].push_back(v);
		edge[v].push_back(u);
	}
	solve();
	fclose(stdin);fclose(stdout);
	return 0;
}
